package com.phpxiu.app.model;

import android.Manifest;

/**
 * @file
 * @brief 动态申请权限
 * @author 吴金洲
 * @note 动态申请权限
 *
 */
public class Permission {

    public final static int REQUEST_COMMON=0x3E9;//基本权限申请

    public final static int REQUEST_LOCATION=REQUEST_COMMON+1;//定位申请

    public final static int REQUEST_PHOTO=REQUEST_LOCATION+1;//编辑图片申请

    public final static int REQUEST_STORE=REQUEST_PHOTO+1;//存储申请

    /**
     * android 6.0+通用危险动态申请权限
     */
    public final static String[] COMMON = {
            Manifest.permission.READ_PHONE_STATE,//电话状态监听android.permission-group.PHONE_CALLS
            Manifest.permission.READ_EXTERNAL_STORAGE,//读取存储卡
            Manifest.permission.WRITE_EXTERNAL_STORAGE,//写存储卡
            Manifest.permission.CAMERA,//摄像头android.permission-group.CAMERA
            Manifest.permission.RECORD_AUDIO//录音android.permission-group.MICROPHONE
    };

    /**
     * android 6.0+定位功能权限
     */
    public final static String[] LOCATION = {
            Manifest.permission.READ_PHONE_STATE,//电话状态监听
            Manifest.permission.READ_EXTERNAL_STORAGE,//读取存储卡
            Manifest.permission.WRITE_EXTERNAL_STORAGE,//写存储卡
            Manifest.permission.ACCESS_COARSE_LOCATION,//获取粗略位置权限，通过基站或wifi来定位的权限
            Manifest.permission.ACCESS_FINE_LOCATION,//获取精确位置权限，通过GPS来定位的权限
    };

    /**
     * android 6.0+图片编辑权限
     */
    public final static String[] PHOTO = {
            Manifest.permission.READ_EXTERNAL_STORAGE,//读取存储卡
            Manifest.permission.WRITE_EXTERNAL_STORAGE,//写存储卡
            Manifest.permission.CAMERA,//摄像头
    };

    /**
     * android 6.0+存储权限
     */
    public final static String[] STORE = {
            Manifest.permission.READ_PHONE_STATE,//电话状态监听
            Manifest.permission.READ_EXTERNAL_STORAGE,//读取存储卡
            Manifest.permission.WRITE_EXTERNAL_STORAGE,//写存储卡
    };

}
